﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Popup.master" AutoEventWireup="true" CodeFile="ProjectFileAttachment.aspx.cs" Inherits="Pages_Private_ProjectFileAttachment" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            var fileName = $('#<%=hdnFileName.ClientID %>').val();
            if (fileName.length > 0) {
                window.opener.AddAttachmentLink(fileName);
                window.close();
            }
        });
    </script> 
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <asp:HiddenField id="hdnFileName" runat="server" />
    <div style="width:95%; margin:10px; margin-right:27px;">        
        <div id="divMessage" runat="server" enableviewstate="false" visible="false"></div>
        <asp:Panel ID="pnlUploadContainer" runat="server">
            <div class="WizardContainer">
                <div class="StepHeaderContainer">
                    <div class="StepHeading">
                        <div class="floatleft"><asp:Literal ID="ltrHeading" runat="server"></asp:Literal></div>
                        <div class="floatright">&nbsp;</div>
                        <div class="clearboth"></div>
                    </div>
                    <div class="StepSubHeading">
                        <asp:Label ID="Label1" runat="server" Text="Add Picture, Brochure to this project. 
                        Remeber, only valid image files (*.jpg, *.jpeg, *.gif, *.png) and Microsoft Word (*.doc, *.docx), PDF (*.pdf) are allowed to attach."></asp:Label>
                    </div>
                </div>
                <div class="StepBody">
                    <table cellpadding="3" cellspacing="0" style="width:90%;">
                        <colgroup>
                            <col style="width:27%;" />
                            <col />
                        </colgroup>
                        <tr>
                            <td><asp:Label ID="lblFileType" runat="server" Text="Image Type"></asp:Label></td>
                            <td>
                                <asp:DropDownList ID="ddlFileType" runat="server"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
							        ControlToValidate="ddlFileType" SetFocusOnError="true"
							        ErrorMessage="Please Select File Type." Display="Dynamic"
							        ValidationGroup="SaveInfo">
						        </asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
					        <td><asp:Label ID="lblSelectFile" runat="server" Text="Select File"></asp:Label></td>
					        <td>
						        <asp:FileUpload ID="fileEnquiry" runat="server" />
					        </td>
				        </tr>
                        <tr>
                            <td colspan="2">
                                <div id="divAttachmentError" runat="server" enableviewstate="false" visible="false"></div>
                            </td>
                        </tr>				    
                    </table>
                </div>
                <div class="StepButtonContainer">
                    <asp:Button ID="btnUpload" runat="server" Text="Upload" ValidationGroup="SaveInfo" OnClick="btnUpload_Click" />  
                </div>       
            </div>         
        </asp:Panel>
    </div>    
</asp:Content>

